Skip to content

Remove native named pipes implementation #878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 7, 2019

Conversation

TylerLeonhardt
Copy link
Member

Now that PowerShell Core 6.0 is EOL, all PowerShell Core versions are built on .NET Core 2.1!

This means that we can take advantage of things added to 2.1, namely the CurrentUserOnly flag on PipeOptions which sets up your named pipes so that only the current user can access them.

Because of this, we can remove the Native Pipe implementation that we took from PowerShell Core.

This needs a PR over to vscode-powershell that says PowerShell Core 6.0 is not supported... but the important change is in this PR.

Copy link
Contributor

@rkeithhill rkeithhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not my area of expertise but "looks" like there is less code overall so 👍

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just one nit to stave off the analyzers

@@ -765,7 +765,7 @@ public Task<RunspaceHandle> GetRunspaceHandleAsync(CancellationToken cancellatio
executionOptions,
true);

throw e;
throw;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof. Good catch

@@ -160,13 +160,12 @@ private async Task OnExecutionCompletedAsync(Task executeTask)
// Respond to the disconnect request and stop the server
await _disconnectRequestContext.SendResultAsync(null);
Stop();
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@TylerLeonhardt
Copy link
Member Author

@PoshChan please remind me in 10 minutes

@PoshChan
Copy link

@TylerLeonhardt, will remind you in 10 minutes

@PoshChan
Copy link

@TylerLeonhardt, this is the reminder you requested 10 minutes ago

@PowerShell PowerShell deleted a comment Apr 18, 2019
@PowerShell PowerShell deleted a comment Apr 18, 2019
@TylerLeonhardt
Copy link
Member Author

this PR now checks for 6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants